package com.wclass.mapper;

import com.baomidou.mybatisplus.mapper.Wrapper;
import com.wclass.entity.BaseFindFilename;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.session.RowBounds;

import java.util.List;

/**
 * <p>
 * 发现-文件夹名称 Mapper 接口
 * </p>
 *
 * @author SEN
 * @since 2018-12-26
 */
public interface BaseFindFilenameMapper extends BaseMapper<BaseFindFilename> {

    @Override
    @Select("select f.*,(select count(*) from base_collect c where c.find_file_id = f.id) as collect_num " +
            "from base_find_filename f " +
            "where 1=1 ${ew.sqlSegment} ")
    List<BaseFindFilename> selectPage(RowBounds rowBounds, @Param("ew") Wrapper<BaseFindFilename> wrapper);

}
